﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LeftUserInfoControl.ascx.cs" Inherits="ExaminationSys.View.Share.LeftUserInfoControl" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<script src="../../js/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $("#btnSignOut").click(function () {
            var answer = confirm("是否退出?");
            if (answer) {

                $.ajax({
                    type: "GET",
                    cache: false,
                    contentType: "application/json",
                    url: "ashx/SignOutHandler.ashx",
                    dataType: 'json',
                    data: null,
                    async: false,
                    success: function (data) {
                        if (data != '200') {
                            alert('操作失败'); return false;
                        }
                        else {
                            var host = window.location.host;
                            window.location.href = "http://" + host + "/Account/Login.aspx";
                        }
                    }
                });
            }
        });

        (function () {
            var host = window.location.host;
            $('#linkIndex').attr('href', "http://" + host + "/Index.aspx");
        })();
    });
    var open=function () {
        UpdatePasswordWindow.show();
    }
</script>

<ext:FormPanel ID="FormPanel1"    Margin="2"   runat="server"  Title="用户信息" Height="160">  
                
            <Content>
            <div style="margin:5px 5px;padding:5px">
                <p style="margin:5px">欢迎您：<%=UserName%></p> 
               <%-- <p style="margin:5px"><a href="javascript:void(0)">[个人资料]</a></p>--%>
                <p style="margin:5px">             
                <a href="javascript:void(0)" id="update">[修改密码]</a></p>
                <p id="P1" style="margin:5px" runat="server">             
          <%--   <asp:LinkButton ID="BtnSignOut" runat="server"     onclick="BtnSignOut_Click">[退出]</asp:LinkButton>--%>
               <p  style="margin:5px"><a id="linkIndex"  target="_blank">首页</a></p> 
                <p  style="margin:5px"><a id="btnSignOut" href="javascript:void(0);">[退出]</a></p>
                </p>
            </div>
            </Content>
            <Items>
            <ext:Label>
            </ext:Label>
            </Items>

            </ext:FormPanel>
            <ext:FormPanel ID="FormPanel2"    Margin="2"  runat="server" Height="170" Title="系统信息">  
            <Items>
            <ext:Label></ext:Label>
            </Items>                
            <Content>       
            <div style="margin:5px 5px;padding:5px">             
                <p style="margin:5px">栏目数：<asp:Literal ID="SectionCount" runat="server"></asp:Literal></p>              
                <p style="margin:5px">试题数：<asp:Literal ID="QuestionCount" runat="server"></asp:Literal></p>              
                <p style="margin:5px">试卷数：<asp:Literal ID="PaperCount" runat="server"></asp:Literal></p>              
                <p style="margin:5px">教师数：<asp:Literal ID="TeacherCount" runat="server"></asp:Literal></p>            
                <p style="margin:5px">学生数：<asp:Literal ID="StudentCount" runat="server"></asp:Literal></p> 
            </div>     
            </Content>
</ext:FormPanel>
